package com.foreknow.dao;

import com.foreknow.model.Business;

import java.sql.SQLException;
import java.util.List;

public interface BusinessDao {
    /**
     * 查询所有
     * @return
     * @throws SQLException
     */
    public List<Object> queryall() throws SQLException;

    /**
     * 根据名字查询
     * @param name
     * @return
     * @throws SQLException
     */
    public List<Object> qaueryByName(String name) throws SQLException;

    /**
     * 根据id修改
     * @param business
     * @param id
     * @return
     * @throws SQLException
     */
    public boolean updateById(Business business,int id) throws SQLException;

    public boolean insert(Business business) throws SQLException;

    public boolean deleteById(int id) throws SQLException;
}
